<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<%
	String path = request.getContextPath();
	request.setAttribute("path", path);
%>

<script type="text/javascript">
	var path = "${path}";
</script>

<%-- <script type="text/javascript" src="${path}/js/common/jquery-1.11.0.js"></script> --%>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.12.1.min.js"></script>

<script type="text/javascript">
	//$.support.cors = true; ie8需要
	var path = "${path}";
	function fn_test() {

		//alert(path);
		var url = "http://192.168.1.60:8080/cxf_spring/ws/etmr/course/createCourse";
		var strdata = "userId=admin&lessonName=test33&schoolId=&lessionClass=一年级&subjectId=1&teacherName=teacher29&lessionType=0&beginTime=20160303133705&links=&invitationUsers=&lession_type=&liveStatus=0&recordStatus=0&courseCode=c-00004";

		url = "http://192.168.1.144:8080/cxfTest/webservice/mycxf/user/infoall";
		//url = "http://127.0.0.1:8080/cxfTest/webservice/mycxf/user/infoall";
		$.ajax({
			type : "POST",
			url : url,
			data : strdata,
			contentType : "application/json",
			dataType : "json",
			async : false,
			cache : false,
			success : function(result) {
				alert(result);
			},
			error : function(error) {
				alert("错误！");
			}
		});

	}
</script>

</head>
<body>
	hello你好
	<input type="button" value="测试跨越请求" onclick="fn_test();">
</body>
</html>